package com.peza.bikelog.business;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.peza.bikelog.business.service.BikelogService;
import com.peza.bikelog.common.domain.LogEntry;

public class Test {

	@Autowired(required=true)
	private static BikelogService service;
	
	
//	public static void main(String[] args) {
//		ApplicationContext appContext = new ClassPathXmlApplicationContext("META-INF/application.xml");
//		service = (BikelogService) appContext.getBean("bikelogService");
//		LogEntry le = service.getLogEntry(100L);
//		System.out.println(le);
//
//	}
	
	public static void main(String[] args) {
		float distance = 15.5F; //kms
		float duration = 1.5F; // hours
		
		float avs = distance/duration;
		int avsInt = (int) (avs*10);
		System.out.println(avsInt);
		float avst = ((float)avsInt)/10;

		System.out.println(avst);
	}


}
